
package grlib;

function integer log2(input integer n);
  integer i;
begin
  log2 = 1;
  for(i=0; 2**i<n; i = i + 1)
    log2 = i + 1;
end
endfunction

endpackage